class S2.UI.Behavior
Description
Abstract base class for assigning sets of events.
Usage
Certain special functions in a behavior class are used directly as event handlers. They follow one of two naming conventions:
on
followed by an event name, as inonscroll
;- an arbitrary identifier, a slash (
/
), then the pattern above, as inpanel/onscroll
.
The former will be attached to the element assigned to this.element
.
The latter will be attached to the element assigned to this.foo
, where
foo
is the part before the slash.
Arbitrary properties (like this.foo
) are designated by the options
argument of the constructor.
Subclasses
Constructor
new S2.UI.Behavior(element, options)
Instance methods
-
destroy #
S2.UI.Behavior#destroy() -> undefined
Called when the behavior is removed from the element.